<tagLib name="html" />

<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.cron.manage_cron}</h3>
        <ul class="tab1">
            <li class="current"><a href="__URL__/cronList"><span>{$Think.lang.cron.all_cron}</span></a></li>
            <li><a href="__URL__/addCron"><span>{$Think.lang.cron.add_cron}</span></a></li>
        </ul>
    </div>
    <p class="tips">{$Think.lang.cron.cron_tips}</p>
    <form name="cpform" method="post" action="__URL__/manageCron" id="cpform">
    <input type="hidden" name="op" value="save" />
    <table class="tb tb2 fixpadding">
        <thead>
        <tr>
            <th>{$Think.lang.enable}</th>
            <th>{$Think.lang.cron.cron_method_name}</th>
            <th>{$Think.lang.cron.cron_type}</th>
            <th>{$Think.lang.cron.last_run_time}</th>
            <th>{$Think.lang.cron.next_run_time}</th>
            <th>{$Think.lang.actions}</th>
            <th width="10%">{$Think.lang.mark}</th>
        </tr>
        </thead>
        <tbody>
        <volist name="cronList" id="vo">
        <tr class="item">
            <td>
                <input type="hidden" name="crons[{$vo.cron_id}]" value="{$vo.cron_id}" />
                <input type="checkbox" class="checkbox" name="status[{$vo.cron_id}]" value="{$vo.status}" <eq name="vo.status" value="1">checked="checked"</eq> />
            </td>
            <td><a href="#" title="{$vo.description}">{$vo.method_name}</a></td>
            <td><eq name="vo.type" value="system">{$Think.lang.cron.cron_buildin}<else/>{$Think.lang.cron.cron_custom}</eq></td>
            <td><notempty name="vo.last_run_time">{$vo.last_run_time|format_date}<else/>{$Think.lang.null}</notempty></td>
            <td><notempty name="vo.next_run_time">{$vo.next_run_time|format_date}<else/>{$Think.lang.null}</notempty></td>
            <td>
                <a class="act" href="__URL__/editCron/cron_id/{$vo.cron_id}">{$Think.lang.edit}</a>&nbsp;&nbsp;&nbsp;
                <a class="act" href="__URL__/runCron/cron_id/{$vo.cron_id}" title="{$Think.lang.cron.run_right_now}">{$Think.lang.cron.run_cron}</a>
            </td>
            <td><input type="checkbox" class="checkbox" name="mods[{$vo.cron_id}]" value="{$vo.cron_id}" <eq name="vo.type" value="system">disabled</eq> /></td>
        </tr>
        </volist>
        </tbody>
        <tr class="nobg">
            <td colspan="6">
                <div class="fixsel right">
                    <input type="submit" class="btn" name="submit" value="{$Think.lang.submit}" />
                </div>
            </td>
            <td width="10%"><input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'mods')" /><label for="chkall">{$Think.lang.delete}?</label></td>
        </tr>
    </table>
    </form>
</div>

<include file="Public:footer" />
